package com.iflytak.service;

import com.iflytak.dao.StudentMapper;
import com.iflytak.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService{
    @Autowired
    private StudentMapper studentMapper;

    public StudentMapper getStudentMapper() {
        return studentMapper;
    }

    public void setStudentMapper(StudentMapper studentMapper) {
        this.studentMapper = studentMapper;
    }

    @Override
    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    @Override
    public int deleteStudentById(int id) {
        return studentMapper.deleteStudentById(id);
    }

    @Override
    public int updataStudent(Student student) {
        return studentMapper.updataStudent(student);
    }

    @Override
    public Student queryStudentByid(int id) {
        return studentMapper.queryStudentByid(id);
    }

    @Override
    public List<Student> queryAllStudent() {
        return studentMapper.queryAllStudent();
    }

    @Override
    public Student queryStudentByName(String name1) {
        return studentMapper.queryStudentByName(name1);
    }

    @Override
    public List<Student> AllStudentNo() {
        return null;
    }


}
